package no.ntnu.fp.client;

public class Appointment {

	private int day, month, year;
	private String start;
	private String end;
	private String owner;
	private String description;
	private String room;
	private int id;
	
	public Appointment(int id, String day, String month, String year, String fromTime, String toTime, String description, 
			String roomID, String owner) {
		this.id = id;
		this.day = Integer.parseInt(day);
		this.month = Integer.parseInt(month);
		this.year = Integer.parseInt(year);
		this.description = description;
		this.room = roomID;
		this.start = fromTime;
		this.end = toTime;
		this.owner = owner;
	}
	
	public String toString() {
		String returnString = "<html>" +"<pre>" + description + "</pre>" +"</html>";
		return returnString;
	}
	
	public String toFullString() {
		if (room.equals("1")) {
			room = "";
		}
		String a = "From: " + start + " | " + "To: " + end + "\n" + "Room: " + room + "\n" + "Owner: " + owner + "\n" + "Description: " + description;
		String returnString = "<html>" +"<pre>" + a + "</pre>" +"</html>";
		return returnString;
	}
	
	public String getFromTime() {
		return start;
	}
	
	public String getToTime() {
		return end;
	}
	
	public String getDescription() {
		return description;
	}
	
	public String getOwner(){
		return owner;
	}
	
	public int getID(){
		return id;
	}
	
	public int getDay() {
		return day;
	}

	public int getMonth() {
		return month;
	}

	public int getYear() {
		return year;
	}
}
